﻿package Space.SpaceObjects 
{
	import flash.utils.ByteArray;
	
	public class Planet extends Space.SpaceObjects.SO
	{
		private var _water:Number;
		private var _food:Number;
		private var _minerals:Number;
		private var _energy:Number;
		
		public function Planet() { }
		
		public function get Water():Number
		{
			return _water;
		}
		
		public function get Food():Number
		{
			return _food;
		}

		public function get Minerals():Number
		{
			return _minerals;
		}

		public function get Energy():Number
		{
			return _energy;
		}

		public function AddResorse(resorse:int)
		{
			if (resorse == 0)
			{
				_water += 1;
			}else if (resorse == 1) {
				_food += 1;
			}else if (resorse == 2) {
				_minerals += 1;
			}else if (resorse == 3) {
				_energy += 1;
			}
		}
	}
	
}